<?php
class Plugin_ChangeLayout extends Zend_Controller_Plugin_Abstract{
	public function preDispatch(Zend_Controller_Request_Abstract $request) {
	
		Zend_Layout::disableLayout();
	
		Zend_Layout::startMvc();
		Zend_Layout::getMvcInstance()->setLayoutPath( APPLICATION_PATH . '/layouts/'.$request->getModuleName() );
		Zend_Layout::getMvcInstance()->setLayout('default');
		Zend_Layout::getMvcInstance()->setContentKey('content');
		
	}
	
}